<?php
class User extends CModel
{
	public function attributes()
	{
		return array(
			'id' => 'pk',
			'email' => array('varchar', 'label' => 'E-mail'),
			'name' => array('varchar', 'length' => 100, 'label' => 'Имя'),
			'timestamps',
		);
	}

	public function rules()
	{
		return array(
			'id, is_active' => array('numerical' => array('integer')),
			'email' => array('required', 'email'),
			'name' => array('required', 'length' => array('min' => 3)),
		);
	}
}